import './assets/my.css'

<template>
  <div id="app">

      <table width="100%">
            <tr>
                <td colspan="2" style="background-color:darkgoldenrod">
                    <router-view name="myHeader"></router-view>
                </td>
            </tr>
            <tr>
                <td width="20%" style="background-color:thistle">
                    <router-view name="mySidebar"></router-view>
                </td>
                <td width="80%" style="background-color:aquamarine">
                    <router-view name="myDetail"></router-view>
                </td>
            </tr>
        </table>

    <img src="./assets/logo.png">
    <p>
            <router-link to="/">Home</router-link>
        <router-link to="/aboutme">别名跳转aboutme</router-link>
        <router-link to="/player/1">Player1</router-link>
        <router-link to="/curry">Curry</router-link>
            <router-link to="/hello">hello</router-link>
            <router-link to="/news">新闻</router-link>
            <router-link to="/about">关于</router-link>
            <router-link to="/player/1">库里</router-link>
            <router-link to="/player/2">哈登</router-link>

            <button @click="btnClick(1)">库里btn</button>
            <button @click="btnClick(2)">哈登btn</button>
          <hr>
          <router-link :to="{ name: 'Player', params: { uid: 1 }}">库里to</router-link>
          <router-link :to="{ path: '/player/2/stats' }">哈登to</router-link>
  </p>

    <router-link to="/user/1/usa">User1</router-link>
        <router-link to="/user/2/china">User2</router-link>
        <router-link to="/user/3/korea">User3</router-link>
  
	  <div class="myclass1">你好！</div>
	  <button class="btn btn-primary">确定</button>
    <button class="btn btn-success">使用</button>
    <button class="btn btn-danger">注意</button>
    <router-view/>
  </div>
</template>

<script>
export default {
  name: 'App',
  methods: {
        btnClick(uid) {
            //this.$router.push({ path: `/player/${uid}` });
            this.$router.push({ path: `/player/${uid}/stats` });
            //this.$router.push({ name: 'Player', params: { uid: uid } });
            //this.$router.push({ path: '/player', query: { uid: uid }}); //url-get参数写法
            //url履历控制
            //this.$router.go(-1);
        }
    }
}
</script>

<style>
#app {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
